<?php /* Smarty version 2.6.18, created on 2010-10-27 16:05:06
         compiled from admin/alumni/news/list_news.tpl */ ?>
<table border="0" cellspacing="1px" cellpadding="10px "align="center" width="100%">
	<tr>
  	<td align="left"><strong>Total:</strong>&nbsp;<?php echo $this->_tpl_vars['TOTAL']; ?>
</td>
    <td align="right"><?php echo $this->_tpl_vars['NAVIGATION_PAGE']; ?>
</td>
  </tr>
</table>
<table border="1" cellspacing="1px" cellpadding="10px "align="center" width="100%">
    <tr>
        <th width="20">#</th>
        <th width="100">Image</th>
        <th>Title</th>
        <th width="120">Create date</th>
        <th width="60">Status</th>
        <th width="60">Send Newsletter</th>
        <th width="60" colspan="2">Action</th>
    </tr>
    <?php $this->assign('keyList', '0'); ?>
    <?php while ($this->_tpl_vars['objListNews']->fetch()) { ?>
    <?php $this->assign('keyList', $this->_tpl_vars['keyList']+1); ?>
    <tr>
        <td><?php echo $this->_tpl_vars['intStart']+$this->_tpl_vars['keyList']; ?>
</td>
        <td>
        	<img border="0" width="100" src="<?php echo @APPLICATION_URL; ?>
images/news/solvay_<?php echo $this->_tpl_vars['objListNews']->image; ?>
" />
        </td>
        <td> <?php echo $this->_tpl_vars['objListNews']->title; ?>
 </td>
        <td> <?php echo $this->_tpl_vars['objListNews']->created; ?>
 </td>
        <td> <?php if ($this->_tpl_vars['objListNews']->status == 1): ?>Yes<?php else: ?>No<?php endif; ?> </td>
         <td> <?php if ($this->_tpl_vars['objListNews']->newsletter == 1): ?>Yes<?php else: ?>No<?php endif; ?> </td>
        <td align="center"> 
        	<a href="<?php echo @APPLICATION_URL; ?>
admin/alumni/news/edit/<?php echo $this->_tpl_vars['objListNews']->id; ?>
" title="Edit" class="link_edit" />
        </td>
        <td align="center"> 
          <a href="#" onclick="deleleNews(<?php echo $this->_tpl_vars['objListNews']->id; ?>
)" title="Edit" class="link_delete" />
        </td>
    </tr>
    <?php } ?>
</table>
<div style="text-align:left; margin:10px 0px;"> 
	<a class="btn_add" style="padding:5px 15px;" href="<?php echo @APPLICATION_URL; ?>
admin/alumni/news/add">Add News</a>
</div>
<script type="text/javascript">
	var xoad_handler = <?php echo $this->_tpl_vars['xoad_handler']; ?>
;
	function deleleNews(p_intId)
	{
		if ( confirm("Are you really want to delete this news?") )
		{
			callAJAX('xoad_handler', 'deletenews', $H({news_id: p_intId}), deleleNews_callBack);
		}
	}
	var deleleNews_callBack = function deleleNews_callBack(results)
	{
		if (results=="SUCCESS")
		{
			window.location.href = window.location.protocol + "//" + window.location.host + window.location.pathname;
		}
		else
		{
			alert("Action successfully!");
		}
	}
	
	function onPage(p_intPage, attach)
	{
		window.location.href = application_url + "admin/alumni/news/list/" + p_intPage;
	}
</script>